package com.microtf.inscription.framework.pojo.vo;

import com.microtf.inscription.framework.annotation.FieldAnnotation;
import com.microtf.inscription.framework.annotation.FormAnnotation;
import com.microtf.inscription.framework.vo.BaseVo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * 类别
 * @author guliuzhong
 */
@FormAnnotation(method = "post", value = "小程序应用配置")
@Data
@EqualsAndHashCode(callSuper = true)
public class MiniAppVo extends BaseVo {
    @FieldAnnotation(title = "appId", order = 1,hide = true)
    Integer id;
    @FieldAnnotation(title = "程序类型", order = 2,listData ={"weChat","微信小程序"})
    String[] type;
    @FieldAnnotation(title = "应用名称",tip = "作为备注使用方便识别",order = 3)
    @NotBlank(message = "应用名称")
    String name;
    @FieldAnnotation(title = "应用平台Id", order = 4)
    @NotBlank(message = "应用平台Id，不能为空")
    String appId;
    @FieldAnnotation(title = "应用平台密钥", order = 5)
    @NotBlank(message = "应用平台密钥，不能为空")
    String appSecret;
    @FieldAnnotation(title = "微信公众平台Token", order = 5)
    String token;
    @FieldAnnotation(title = "微信公众平台",tip = "消息加密密钥由43位字符组成，可随机修改，字符范围为A-Z，a-z，0-9。详见微信EncodingAESKey",order = 5)
    String encodingAESKey;
    @FieldAnnotation(title = "环境ID", tip = "查看文档 https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html", order = 6)
    String cloudEnv;
    @FieldAnnotation(title = "启用", order = 7)
    Boolean enable=false;
    @FieldAnnotation(title = "创建日期", order = 8)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    Date createDate;
    @FieldAnnotation(title = "更新日期", order = 9)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    Date updateDate;
}
